/*
 * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
 *
 * https://www.mall4j.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */
package com.yami.shop.distribution.common.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.yami.shop.distribution.common.vo.DistributionUserVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author yami
 */
@Data
@TableName( "tz_distribution_user_wallet")
public class DistributionUserWallet {

    @TableId
    @ApiModelProperty("分销员钱包id")
    private Long walletId;

    @ApiModelProperty("分销员id")
    private Long distributionUserId;

    @ApiModelProperty("待结算金额(用户付款后 增加该金额,结算时减少该金额,取消订单或退货减少该金额)")
    private Double unsettledAmount;

    @ApiModelProperty("可提现金额(用户收货后或者维权期过后增加该金额,提现减少该金额)")
    private Double settledAmount;

    @ApiModelProperty("积累收益(用户收货后或者维权期过后增加该金额,提现不减少该金额)")
    private Double addupAmount;

    @ApiModelProperty("失效金额(用户取消订单或退货增加该金额)")
    private Double invalidAmount;

    @Version
    @ApiModelProperty("乐观锁")
    private Integer version;

    @ApiModelProperty("钱包状态( 0未生效(分销审核未通过) 1正常)")
    private Integer state;

    @ApiModelProperty("关联分销员")
    @TableField(exist = false)
    private DistributionUserVO distributionUser;


    @ApiModelProperty("可提现的改变金额")
    @TableField(exist = false)
    private Double changeAmount;
}
